package com.demo.dao;

import com.demo.model.ArticleReply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleReplyMapper {
    int insert(ArticleReply row);

    int insertSelective(ArticleReply row);

    ArticleReply selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ArticleReply row);

    int updateByPrimaryKey(ArticleReply row);

    /**
     * 要查看哪一个帖子的回复帖：所以传入的id是帖子id，不是回复帖的自增id
     * @param articleId 帖子id
     * @return List<ArticleReply>
     */
    List<ArticleReply> selectByArticleId(@Param("articleId") Long articleId);
}